<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/index.css" th:href="@{/css/index.css}">
    <!-- 引入car css -->
    <link rel="stylesheet" href="css/car.css" th:href="@{/css/car.css}">
    <title>银行卡用户管理系统</title>
</head>
<body>
<header>
    <div style="position: absolute;top: .2rem;left: 1.0875rem;color: aliceblue;font-size: .2rem;cursor: pointer;" id="username">
        <img src="images/user.jpg" alt="" style="border-radius: 15px;margin-right: 10px;" th:src="@{/images/user.jpg}">[[${#session.getAttribute('loginUser')}]]
    </div>
    <!--<div th:text="${#session.getAttribute('loginUser')}" style="position: absolute;top: 10px;left: 10px;"></div>-->
    <h1>货存管理系统</h1>
    <div class="showTime"></div>
    <script>
        var t = null;
        t = setTimeout(time, 0); //開始运行
        function time(){
            clearTimeout(t); //清除定时器
            dt = new Date();
            var y = dt.getFullYear();
            var mt = dt.getMonth() + 1;
            var day = dt.getDate();
            var h = dt.getHours(); //获取时
            h = h < 10 ? '0' + h : h;
            var m = dt.getMinutes(); //获取分
            m = m < 10 ? '0' + m : m;
            var s = dt.getSeconds(); //获取秒
            s = s < 10 ? '0' + s : s;
            document.querySelector(".showTime").innerHTML = '当前时间：' + y + "年" + mt + "月" + day + "-" + h + "时" + m + "分" + s + "秒";
            t = setTimeout(time, 1000); //设定定时器，循环运行
        }
    </script>
</header>
<!-- 页面主题 -->
<section class="mainbox">
    <div class="column">
        <div class="panel bar panel1">
            <h2>商品库存</h2>
            <div class="chart1">图标</div>
            <div class="panel-footer"></div>
        </div>
        <div class="panel bar2">
            <h2>老顾客</h2>
            <div class="chart"></div>
            <div class="panel-footer"></div>
        </div>
    </div>

    <div class="column">
        <div class="no">
            <div class="no-hd">
                <ul>
                    <li id="num">1563</li>
                    <li id="money">124500</li>
                </ul>
            </div>
            <div class="no-bd">
                <ul>
                    <li>已销售商品数目</li>
                    <li>已获净利润</li>
                </ul>
            </div>
        </div>
        <div class="map">
            <div class="map1"></div>
            <div class="map2"></div>
            <div class="map3"></div>
            <div class="showPlan">
                <!-- 购物车主要核心区域 -->
                <div class="cart-warp">
                    <!-- 头部全选模块 -->
                    <div class="cart-thead">
                        <div class="t-goods">商品</div>
                        <div class="t-price">单价</div>
                        <div class="t-num">数量</div>
                        <div class="t-sum">小计</div>
                        <div class="t-action">操作</div>
                    </div>
                    <!-- 商品详细模块 -->
                    <div class="cart-item-list">
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>

                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>
                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>


                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                        <div class="show">
                            <div class="cart-item " style="display: none;">
                                <div class="p-goods">
                                    <select class="select" style="width: 145px;height: 30px;">
                                        <option value="耐克运动鞋">耐克运动鞋</option>
                                        <option value="波斯登羽绒服">波斯登羽绒服</option>
                                        <option value="阿迪短袖">阿迪短袖</option>
                                        <option value="马丁靴">马丁靴</option>
                                        <option value="雪碧">雪碧</option>
                                        <option value="可乐">可乐</option>
                                        <option value="辣条">辣条</option>
                                        <option value="虾条">虾条</option>
                                        <option value="百乐钢笔">百乐钢笔</option>
                                        <option value="百乐墨水">百乐墨水</option>
                                        <option value="橡皮">橡皮</option>
                                        <option value="铅笔">铅笔</option>
                                    </select>
                                    <!-- <div class="p-msg">耐克运动鞋</div> -->
                                </div>
                                <div class="p-price">￥666.6</div>
                                <div class="p-num">
                                    <div class="quantity-form">
                                        <a href="javascript:;" class="decrement">-</a>
                                        <input type="text" class="itxt" value="0">
                                        <a href="javascript:;" class="increment">+</a>
                                    </div>
                                </div>
                                <div class="p-sum">￥0</div>
                                <div class="p-action"><a href="javascript:;">删除</a></div>
                            </div>
                        </div>
                    </div>
                    <!-- 结算模块 -->
                    <div class="cart-floatbar">
                        计划日期
                        <select class="select" style="width: 100px;height: 30px;" id="year">
                            <option value="2020">2020年</option>
                            <option value="2021">2021年</option>
                        </select>
                        <select class="select" style="width: 100px;height: 30px;" id="month">
                            <option value="1">1月</option>
                            <option value="2">2月</option>
                            <option value="3">3月</option>
                            <option value="4">4月</option>
                            <option value="5">5月</option>
                            <option value="6">6月</option>
                            <option value="7">7月</option>
                            <option value="8">8月</option>
                            <option value="9">9月</option>
                            <option value="10">10月</option>
                            <option value="11">11月</option>
                            <option value="12">12月</option>
                        </select>
                        计划人 <input type="text" style='width: 100px;height: 30px;' id="worker">
                        <div  style="float: right">
                            <button onclick="send();" class="btn-area">生成计划单</button>
                        </div>
                        <div class="price-sum" style="float: right">总价：<em>0</em></div>
                    </div>
                </div>
            </div>
            <div class="showBuy">
            <!-- 购物车主要核心区域 -->
            <div class="cart-warp">
                <!-- 头部全选模块 -->
                <div class="cart-thead">

                    <div class="t-goods">商品</div>
                    <div class="t-price">单价</div>
                    <div class="t-num">数量</div>
                    <div class="t-sum">小计</div>
                    <div class="t-action">操作</div>
                </div>
                <!-- 商品详细模块 -->
                <div class="cart-item-list">
                    <div class="show">
                        <div class="cart-item" style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>
                                    <option value="马丁靴">马丁靴</option>
                                    <option value="雪碧">雪碧</option>
                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>
                                    <option value="波斯登羽绒服">波斯登羽绒服</option>
                                    <option value="阿迪短袖">阿迪短袖</option>
                                    <option value="马丁靴">马丁靴</option>
                                    <option value="雪碧">雪碧</option>
                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>
                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>
                                    <option value="波斯登羽绒服">波斯登羽绒服</option>
                                    <option value="阿迪短袖">阿迪短袖</option>
                                    <option value="马丁靴">马丁靴</option>
                                    <option value="雪碧">雪碧</option>
                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>
                                </select>

                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>

                                    <option value="波斯登羽绒服">波斯登羽绒服</option>

                                    <option value="阿迪短袖">阿迪短袖</option>

                                    <option value="马丁靴">马丁靴</option>

                                    <option value="雪碧">雪碧</option>

                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>


                                </select>


                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                    <div class="show">
                        <div class="cart-item " style="display: none;">
                            <div class="p-goods">
                                <select class="select1" style="width: 145px;height: 30px;">
                                    <option value="耐克运动鞋">耐克运动鞋</option>
                                    <option value="波斯登羽绒服">波斯登羽绒服</option>
                                    <option value="阿迪短袖">阿迪短袖</option>
                                    <option value="马丁靴">马丁靴</option>
                                    <option value="雪碧">雪碧</option>
                                    <option value="可乐">可乐</option>
                                    <option value="辣条">辣条</option>
                                    <option value="虾条">虾条</option>
                                    <option value="百乐钢笔">百乐钢笔</option>
                                    <option value="百乐墨水">百乐墨水</option>
                                    <option value="橡皮">橡皮</option>
                                    <option value="铅笔">铅笔</option>
                                </select>
                                <!-- <div class="p-msg">耐克运动鞋</div> -->
                            </div>
                            <div class="p-price">￥766.6</div>
                            <div class="p-num">
                                <div class="quantity-form">
                                    <a href="javascript:;" class="decrement">-</a>
                                    <input type="text" class="itxt" value="0">
                                    <a href="javascript:;" class="increment">+</a>
                                </div>
                            </div>
                            <div class="p-sum">￥0</div>
                            <div class="p-action"><a href="javascript:;">删除</a></div>
                        </div>
                    </div>
                </div>

                <!-- 结算模块 -->
                <div class="cart-floatbar">
                    出货日期<select class="select" style="width: 100px;height: 30px;" id="year2">
                    <option value="2020">2020年</option>
                    <option value="2021">2021年</option>
                </select>
                    <select class="select" style="width: 100px;height: 30px;" id="month2">
                        <option value="1">1月</option>
                        <option value="2">2月</option>
                        <option value="3">3月</option>
                        <option value="4">4月</option>
                        <option value="5">5月</option>
                        <option value="6">6月</option>
                        <option value="7">7月</option>
                        <option value="8">8月</option>
                        <option value="9">9月</option>
                        <option value="10">10月</option>
                        <option value="11">11月</option>
                        <option value="12">12月</option>
                    </select>
                    出货人 <input type="text" style='width: 100px;height: 30px;' id="worker1">
                    <div onclick="window.location.href='/showSell';" style="float: right">
                        <button onclick="send2();" class="btn-area">生成出货单</button>
                    </div>
                    <div class="price-sum">总价：<em>0</em></div>
                </div>
            </div>
        </div>
        </div>
    </div>

    <div class="column">
        <div class="panel pie1">
            <h2>热销商品</h2>
            <div class="chart">图标</div>
            <div class="panel-footer"></div>
        </div>
        <div class="panel bar3">
            <h2>提醒进货</h2>
            <div class="chart">图标</div>
            <div class="panel-footer"></div>
        </div>
        <div class="panel">
            <h2>清单</h2>
            <div class="btn">
                <button class="btn-plan">制定计划清单</button>
                <button class="btn-buy">制定出货清单</button>
                <button class="btn-buy"><a th:href="@{/showPlans}" style="color: #000">制定采购清单</a></button>
                <button class="btn-buy"><a th:href="@{/showBuys}" style="color: #000">查询采购清单</a></button>
                <div style="line-height: 4em">
                    <button class="btn-buy"><a th:href="@{/showSells}" style="color: #000">查询出货清单</a></button>
                </div>
                <button class="btn-buy"><a th:href="@{/showOrders}" style="color: #000">查询积存订单</a></button>
            </div>
            <div class="panel-footer"></div>
        </div>
    </div>
</section>
<script src="js/flexible.js" th:src="@{/js/flexible.js}"></script>
<script src="js/echarts.min.js" th:src="@{/js/echarts.min.js}"></script>
<script src="js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="js/index.js" th:src="@{/js/index.js}"></script>
<script src="js/cart.js" th:src="@{/js/cart.js}"></script>
<script>
    function getId1(name) {
        for(var i=0;i<12;i++){
            if(nameList[i]==name) return i;
        }
    }
    $(".showBuy").find(".itxt").change(function(){
        var name = $(this).parents('.p-num').siblings('.p-goods').find('.select1').find('option:selected').val()
        // alert(name)
        console.log(name)
        var id =getId1(name)
        var num =option1.series[0].data[id]
        console.log(num)
        console.log(name);
        if ($(this).val() > num) {
            alert("出货数量超过库存")
            $(this).val(0)
        }
    })
    var nameList = ['耐克运动鞋','波斯登羽绒服','阿迪短袖','马丁靴','雪碧','可乐','辣条','虾条','百乐钢笔','百乐墨水','橡皮','铅笔'];
    function getId(name) {
        for(var i=0;i<12;i++){
            if(nameList[i]==name) return i+1;
        }
    }
    $('.show').click(
        function() {
            $(this).children('.cart-item').css('display', 'block')
        }
    )
    function send(){
        var temps = $(".cart-item");
        var dataList = [];
        var total = 0;
        var last = parseFloat($("#money").text())
        for(var i=0;i<12;i++){
            if($(temps[i]).css("display")=='block'){
                var temp = $(temps[i]).children(".p-goods").children(".select");
                var name = temp.val();
                var id = getId(name)
                var price = $(temps[i]).children(".p-price").text().substr(1);
                var num = $(temps[i]).children(".p-num").children(".quantity-form").children(".itxt").val();
                var str = {"id":id,"name":name,"price":price,"num":num}
                total = total+parseFloat(price)*parseInt(num);
                if(num==0) continue;
                dataList.push(str)
            }
        }
        var year = $("#year").val();
        var month = $("#month").val();
        var worker = $("#worker").val();
        var str = {"year":year,"month":month,"worker":worker};
        dataList.push("t")
        dataList.push(str)
        if(last<total){
            alert("余额不足")
            return
        }else{
            // alert(JSON.stringify(dataList))
            $.ajax({
                    async: false,
                    url:"/plan",
                    type:"post",
                    contentType : "application/json",
                    data:JSON.stringify(dataList),
                    success:function (dataResponse){

                    },
                    error:function () {
                        alert("出错了!!!")
                    }
                }
            );
        }
        window.location.href="/showPlan"
    }
    function send2(){
        var temps = $(".cart-item");
        var dataList = [];
        for(var i=12;i<24;i++){
            if($(temps[i]).css("display")=='block'){
                var temp = $(temps[i]).children(".p-goods").children(".select1");
                var name = temp.val();
                var id = getId(name)
                var price = $(temps[i]).children(".p-price").text().substr(1);
                var num = $(temps[i]).children(".p-num").children(".quantity-form").children(".itxt").val();
                var str = {"id":id,"name":name,"price":price,"num":num}
                if(num==0) continue;
                dataList.push(str)
            }
        }
        var year = $("#year2").val();
        var month = $("#month2").val();
        var worker = $("#worker1").val();
        var str = {"year":year,"month":month,"worker":worker};
        dataList.push("t")
        dataList.push(str)
        // alert(JSON.stringify(dataList))
        $.ajax({
                async: false,
                url:"/sell",
                type:"post",
                contentType : "application/json",
                data:JSON.stringify(dataList),
                success:function (dataResponse) {

                },
                error:function () {
                    alert("出错了3")
                }
            }
        );
    }
    function getGoods(goods){
        // alert(goods)
        var data = [];
        for(var i=0;i<goods.length;i++){
            data.push(goods[i].gnum);
        }
        option1.series[0].data = data;
        // alert(data)
        mychart1.setOption(option1)
    }
    function setMoney(dataResponse){
        var tem = dataResponse;
        var money = tem.money;
        var num = tem.num;
        $("#num").text(num)
        $("#money").text(money)
    }
    function remind(dataResponse){
        var data1 = []
        var data2 = []
        for(var i= 0;i<dataResponse.length;i++){
            data1.push(dataResponse[i].gnum)
            data2.push(dataResponse[i].gdetail)
        }
        option3.xAxis.data = data2
        option3.series[0].data = data1
        mychart3.setOption(option3)
    }
    $.ajax({
            url:"/goods",
            type:"post",
            success:function (dataResponse) {
                getGoods(dataResponse);
            },
            error:function (){
                alert("出错了4")
            },
            dataType:"json"
        }
    );

    $.ajax({
            url:"/money",
            type:"post",
            success:function (dataResponse) {
                setMoney(dataResponse);
            },
            error:function (){
                alert("出错了5")
            },
            dataType:"json"
        }
    );
    $.ajax({
            url:"/remind",
            type:"post",
            success:function (dataResponse) {
                remind(dataResponse);
            },
            error:function (){
                alert("出错了6")
            },
            dataType:"json"
        }
    );
</script>
</body>
</html>